package com.gosophia.metadataEngine.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseSupportAction;
import com.gosophia.metadataEngine.dto.DataSourceInfoDto;
import com.gosophia.metadataEngine.ws.MetadataEngineWebService;
/**
 * 删除数据源action
 * @author wangxinbing
 * @since 2011-05-09
 */
@Controller("DeleteDataSourceInfoAction")
@Scope("prototype")
public class DeleteDataSourceInfoAction extends BaseSupportAction {
	
	private Long dataSourceInfoId;
	
	private Long dataSourceInfoVersion;
	
	private DataSourceInfoDto deleteDataSourceInfoDto;
	@Autowired
	private MetadataEngineWebService metadataEngineWebService;
	@Override
	public String _execute() throws Exception {
		deleteDataSourceInfoDto = metadataEngineWebService.removeDataSourceInfo(dataSourceInfoId, dataSourceInfoVersion);
		return SUCCESS;
	}
	public Long getDataSourceInfoId() {
		return dataSourceInfoId;
	}
	public void setDataSourceInfoId(Long dataSourceInfoId) {
		this.dataSourceInfoId = dataSourceInfoId;
	}
	public Long getDataSourceInfoVersion() {
		return dataSourceInfoVersion;
	}
	public void setDataSourceInfoVersion(Long dataSourceInfoVersion) {
		this.dataSourceInfoVersion = dataSourceInfoVersion;
	}
	public DataSourceInfoDto getDeleteDataSourceInfoDto() {
		return deleteDataSourceInfoDto;
	}
	public void setDeleteDataSourceInfoDto(DataSourceInfoDto deleteDataSourceInfoDto) {
		this.deleteDataSourceInfoDto = deleteDataSourceInfoDto;
	}
	public MetadataEngineWebService getMetadataEngineWebService() {
		return metadataEngineWebService;
	}
	public void setMetadataEngineWebService(
			MetadataEngineWebService metadataEngineWebService) {
		this.metadataEngineWebService = metadataEngineWebService;
	}
	
	

}
